﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace prova
{
    public class Alumne
    {
        private int nmatricula;
        private string nom;
        private string cognom;
        //prova per subversion, canvi publicat pel progamador 1
        private DateTime dataNaixament;

        public int Nmatricula
        {
            get { return nmatricula; }
            set { nmatricula = value; }
        }

        public string Nom
        {
            get { return nom; }
            set { nom = value; }
        }
        

        public string Cognom
        {
            get { return cognom; }
            set 
            {
                if (value == "")
                {
                    throw new System.Exception("Error el cognom no pot estar buit");
                }
                cognom = value; 
            }
        }
    }
}
